<?php
/**
 * Created by PhpStorm.
 * User: changyifan
 * Date: 2018/2/7
 * Time: 下午1:36
 * 节
 */

namespace Home\Dao;
use Think\Model\BaseDao;

class SectionDao extends BaseDao{
    public function reOrder($exchangeList){
        $list = $exchangeList;
        $flag = true;
        foreach($list as $key => $value){
            $arr = explode(',',$value);
            $info = $this -> where(array('sec_id'=> $arr[0]))-> setField('sec_order',$arr[1]);
            $flag = $info ? true:false;
        }

        return $flag;
    }
}